<template>
  <div>
    <el-button size="mini" type="success" @click="to">编辑</el-button>
    <eForm ref="form" :dict="dict" :sup_this="sup_this" :is-add="false"/>
  </div>
</template>
<script>
import eForm from './form'
export default {
  components: { eForm },
  props: {
    data: {
      type: Object,
      required: true
    },
    sup_this: {
      type: Object,
      required: true
    },
      dict: {
        type: Object,
        required: true
    }
  },
  methods: {
    to() {
      const _this = this.$refs.form
      _this.form = {
        id: this.data.id,
        workerId: this.data.workerId,
        cartNum: this.data.cartNum,
        workerDeviceNum: this.data.workerDeviceNum,
        workerName: this.data.workerName,
        idNum: this.data.idNum,
        telNum: this.data.telNum,
        deptId: this.data.deptId,
        jobId: this.data.jobId,
        registrationTime: this.data.registrationTime,
        carNum: this.data.carNum,
        remark1: this.data.remark1,
        remark2: this.data.remark2,
        remark3: this.data.remark3,
        idPic1: this.data.idPic1,
        idPic2: this.data.idPic2,
        facePic: this.data.facePic,
        creator: this.data.creator,
        createTime: this.data.createTime,
        updator: this.data.updator,
        updateTime: this.data.updateTime
      }
      _this.dialog = true
    }
  }
}
</script>

<style scoped>
  div{
    display: inline-block;
    margin-right: 3px;
  }
</style>
